Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Fix] Fixed app/service list consistency. #192

Merged
merged 4 commits into from
Apr 17, 2015
Merged

Conversation

3Hren
Copy link
Member

@3Hren 3Hren commented Apr 17, 2015

When Cocaine was unable to start an app it threw an exception, which wasn't been caught. It led to app/service list inconsistency.

For example:

> node.list
> []
>
> node.start_app :http, :default
> [1, "fuck you"]
>
> node.list
> ["http"]
>
> node.pause_app :http
> [1, "app 'http' is not running"]

This commit should fix that behavior.

When Cocaine was unable to start an app it threw an exception, which wasn't been caught. It led to app/service list inconsistency. This commit should fix that behavior.
@@ -131,21 +131,19 @@ node_t::prototype() const {

void
node_t::on_start_app(const std::string& name, const std::string& profile) {
auto ptr = m_apps.synchronize();
auto it = ptr->find(name);
m_apps.apply([&](std::map<std::string, std::shared_ptr<app_t>>& apps){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace before {.

kobolog pushed a commit that referenced this pull request Apr 17, 2015
[Bug Fix] Fixed app/service list consistency.
@kobolog kobolog merged commit b34bc3a into cocaine:v0.12 Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants